<?php 
switch($adc->getViewObject())
{
	case 'AdEdit':
	break;
	case 'AdLatest':
		//echo '<br />';
		/*
		if($ad->getBrandId() > 0)
		{
			echo '<p>';
			if($txt->getWord('brand_'.$ad->getTypeId()) != 'brand_'.$ad->getTypeId())
			{ echo ucfirst($txt->getWord('brand_'.$ad->getTypeId())); }
			else
			{ echo ucfirst($txt->getWord('brand')); }
			echo ':&nbsp; <span itemprop="brand">'.$txt->truncate($ad->getBrandTitle(), 26, '', '', '').'</span> ';
			echo '</p>';
		}
		*/
	break;
	default:
		if(($ad->getModTitle() != '') || ($ad->getModel() != ''))
		{
			echo '<p>';
				//echo ucfirst($txt->getWord('model')).': '; ?><a href="<?php echo $ad->getLink(); ?>"><?php 
				if($ad->getBrandId() > 0)
				{ echo '<span itemprop="brand">'.$txt->truncate($ad->getBrandTitle(), 26, '', '', '').'</span> '; }
				echo '<span itemprop="model">';
				echo $ad->getModTitle(); 
				echo $ad->getModel();
				echo '</span> - ';
				echo ucfirst($ad->getIsBuyingText());
				if($ad->getDisplayIsNew())
				{
					if($ad->getIsNew() == 0)
					{ echo ' '.$txt->getWord('used').' '; }
				}
				?></a>
			<?php
			echo '</p>';
		}
	break;
}
?>
<p><?php 
switch($adc->getViewObject())
{
	case 'AdEdit':
	break;
	case 'AdGallery':
		if($ad->getBrandId() > 0)
		{
			if($ad->getCatId() > 0)
			{ echo ucfirst($txt->getWord('category')).':&nbsp;'; }
			else
			{
				if($txt->getWord('brand_'.$ad->getTypeId()) != 'brand_'.$ad->getTypeId())
				{ echo ucfirst($txt->getWord('brand_'.$ad->getTypeId())); }
				else
				{ echo ucfirst($txt->getWord('brand')); }
			}
			/*
			if(($_GET['adcat'] == $ad->getCatId()) && ($_GET['adbrand'] == $ad->getBrandId()))
			{ $url = $ad->getLink(); }
			else
			{ $url = $katana->getURL().'/adcat/'.$ad->getCatId().'/adbrand/'.$ad->getBrandId().'/'; }
			*/
			$url = $ad->getLink();
			?>
			<a href="<?php echo $url; ?>"><?php 
			if($ad->getDisplayIsNew())
			{
				if($ad->getIsNew() == 0)
				{ echo ''.ucfirst($txt->getWord('used')).' '; }
			}
			//echo '<span itemprop="brand">'.$txt->truncate($ad->getBrandTitle(), 26, '', '', '').'</span> ';
			//if($ad->getModId() > 0)
			//{ echo $txt->truncate($ad->getModTitle(), 26, '', '', ''); }
			//else
			//{ 
			echo $txt->truncate($ad->getCatTitle(), 26, '', '', ''); //}
			?></a>
		<?php
		}
		else
		{
			if($ad->getCatId() > 0)
			{
				echo ucfirst($txt->getWord('category'));
				?>:&nbsp;<a href="<?php echo $katana->getURL(); ?>/adcat/<?php echo $ad->getCatId(); ?>/"><?php echo $txt->truncate($ad->getCatTitle(), 26, '', '', ''); ?></a>
			<?php 
			} 
		}
	break;
	default:
		if($ad->getBrandId() > 0)
		{
			if($ad->getCatId() > 0)
			{ echo ucfirst($txt->getWord('category')); }
			else
			{
				if($txt->getWord('brand_'.$ad->getTypeId()) != 'brand_'.$ad->getTypeId())
				{ echo ucfirst($txt->getWord('brand_'.$ad->getTypeId())); }
				else
				{ echo ucfirst($txt->getWord('brand')); }
			}
			?>:&nbsp;
			
				<?php 
				if(($_GET['adcat'] == $ad->getCatId()) && ($_GET['adbrand'] == $ad->getBrandId()))
				{ $url = $ad->getLink(); }
				else
				{ $url = $katana->getURL().'/adcat/'.$ad->getCatId().'/adbrand/'.$ad->getBrandId().'/'; }
				?>
				<a href="<?php echo $url; ?>"><?php 
				if($ad->getDisplayIsNew())
				{
					if($ad->getIsNew() == 0)
					{ echo ''.ucfirst($txt->getWord('used')).' '; }
				}
				echo '<span itemprop="brand">'.$txt->truncate($ad->getBrandTitle(), 26, '', '', '').'</span> ';
				//if($ad->getModId() > 0)
				//{ echo $txt->truncate($ad->getModTitle(), 26, '', '', ''); }
				//else
				//{ 
				echo $txt->truncate($ad->getCatTitle(), 26, '', '', ''); //}
				?></a>
		<?php
		}
		else
		{
			if($ad->getCatId() > 0)
			{
				echo ucfirst($txt->getWord('category'));
				?>:&nbsp;<a href="<?php echo $katana->getURL(); ?>/adcat/<?php echo $ad->getCatId(); ?>/"><?php echo $txt->truncate($ad->getCatTitle(), 26, '', '', ''); ?></a>
			<?php 
			} 
		}
	break;
}
?></p>